<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta charset="UTF-8">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1">
<title>Insert title here</title>
<link rel="stylesheet" href="../css/home.css">
<link rel="stylesheet" href="../css/jquery.mobile.structure-1.2.0.css" />
<link rel="stylesheet" href="../css/jquery.mobile-1.2.0.css" />

<script type="text/javascript" charset="utf-8" src="../javascript/jquery-1.6.2.js"></script>
<script type="text/javascript" charset="utf-8" src="../javascript/jquery.mobile-1.2.0.js"></script>


</head>

<body>

<div id="mode_presenter" data-role="page">

<script>

function LoginCheck(userid, userpw){
			if(userid == "" || userpw ==""){
				if(userid == ""){
					alert("ID를 입력하세요");
					$("#id").focus();
				}else if(userpw == ""){
					alert("패스워드를 입력하세요");
					$("#pw").focus();
				}
			}
			else{
				console.log("loginnnn form 가기전");
				
				$("#mobileform").submit();
			}
			
}
		

function login(){
	
			
	var id = $("#id").val();
	var pw = $("#pw").val();
			
	LoginCheck(id, pw);
			
}




$('#login_bt').live('click', function() {
	  // Live handler called.
	login();
});

$('#join_bt').live('click', function() {
	  // Live handler called.
	location.href="./join.jsp";
});



</script>

<header data-role="header" data-theme="a">
<a href="http://210.118.74.126:8080/hackaton/" id="back_bt" class="ui-btn-left" data-theme="c"  data-role="button" data-icon="home">Back</a>
		<h1 id=headd>사각사각로직</h1>
</header>


<article>
<div data-role="content">
<div id="vacancy1">　　　　</div>
<center>Login
<div id="vacancy2">　　</div>
<form method="post" action="../LoginServlet" id="mobileform" data-ajax="false">

<input type="text" id="id" name="id" placeholder="Username"  />
<input type="password" id="pw" name="pw" placeholder="Password" />
 
</form>

<input type="submit" value="로그인" id="login_bt" data-inline="true"/>
<input type="submit" value="회원가입" id="join_bt" data-inline="true"/>


</center>

</div>
</article>


</div>
</body>



</html>